package com.py.inbound.service.impl;

import java.util.List;

import com.py.inbound.domain.WhOutbound;
import com.py.inbound.mapper.WhOutboundMapper;
import com.py.inbound.service.IWhOutboundService;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 出库管理Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-19
 */
@Service
public class WhOutboundServiceImpl implements IWhOutboundService {
    @Autowired
    private WhOutboundMapper whOutboundMapper;

    /**
     * 查询出库管理
     *
     * @param outboundId 出库管理主键
     * @return 出库管理
     */
    @Override
    public WhOutbound selectWhOutboundByOutboundId(Long outboundId) {
        return whOutboundMapper.selectWhOutboundByOutboundId(outboundId);
    }

    /**
     * 查询出库管理列表
     *
     * @param whOutbound 出库管理
     * @return 出库管理
     */
    @Override
    public List<WhOutbound> selectWhOutboundList(WhOutbound whOutbound) {
        return whOutboundMapper.selectWhOutboundList(whOutbound);
    }

    /**
     * 新增出库管理
     *
     * @param whOutbound 出库管理
     * @return 结果
     */
    @Override
    public int insertWhOutbound(WhOutbound whOutbound) {
        whOutbound.setCreateTime(DateUtils.getNowDate());
        return whOutboundMapper.insertWhOutbound(whOutbound);
    }

    /**
     * 修改出库管理
     *
     * @param whOutbound 出库管理
     * @return 结果
     */
    @Override
    public int updateWhOutbound(WhOutbound whOutbound) {
        whOutbound.setUpdateTime(DateUtils.getNowDate());
        return whOutboundMapper.updateWhOutbound(whOutbound);
    }

    /**
     * 批量删除出库管理
     *
     * @param outboundIds 需要删除的出库管理主键
     * @return 结果
     */
    @Override
    public int deleteWhOutboundByOutboundIds(Long[] outboundIds) {
        return whOutboundMapper.deleteWhOutboundByOutboundIds(outboundIds);
    }

    /**
     * 删除出库管理信息
     *
     * @param outboundId 出库管理主键
     * @return 结果
     */
    @Override
    public int deleteWhOutboundByOutboundId(Long outboundId) {
        return whOutboundMapper.deleteWhOutboundByOutboundId(outboundId);
    }

    @Override
    public List<WhOutbound> WhOutboundLS(WhOutbound whOutbound) {
        return whOutboundMapper.WhOutboundLS(whOutbound);
    }

    @Override
    public WhOutbound outTotle() {
        return whOutboundMapper.outTotle();
    }
}
